<template>
  <div>
    <el-table :data="lst">
      <el-table-column prop="code" label="编号"> </el-table-column>
      <el-table-column prop="title" label="标题"> </el-table-column>
      <el-table-column prop="described" label="描述"> </el-table-column>
      <el-table-column prop="money" label="金币"> </el-table-column>
      <el-table-column prop="userid" label="雇主"> </el-table-column>
      <el-table-column prop="closeid" label="支付方式"> </el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="handleClick(scope.row.code)">审核</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      lst: "",
      userid: localStorage.getItem("userid"),
    };
  },
  mounted() {
    this.getneed();
  },
  methods: {
    getneed() {
      this.axios.get("/sneed?userid=" + this.userid).then((res) => {
        this.lst = res.data.data;
      });
    },
    handleClick(code){
        this.axios.get("/shneed?code="+code).then(res =>{
            alert(res.data.msg)
        })
    }
  },
};
</script>

<style>
</style>